import request from '../tools/index.js'

export function getNav () {
  return request.get('/pro/fl')
}

export function getPro (params) {
  return request.get('/pro/page', { params })
}

export function searchAdd (params) {
  return request.post('/search/add', params)
}

export function getText (params) {
  return request.get('/search/show', { params })
}

export function delText (params) {
  return request.post('/search/del', params)
}

export function getColumn (params) {
  return request.get('/pro/fl', { params })
}

export function getColumnBrand (params) {
  return request.get('/pro/getBrand', { params })
}

export function getSearchBrand (params) {
  return request.get('/pro/brandColumn', { params })
}

export function getSearchPro (params) {
  return request.get('/pro/search', { params })
}

export function getOrder (params) {
  return request.get('/order', { params })
}

export function getOrderRes (params) {
  return request.get('/order/orderDetail', { params })
}

export function getDetail (params) {
  return request.get('/pro/one', { params })
}
export function addCart (params) {
  return request.post('/cart/add', params)
}
export function getCartNum (params) {
  return request.get('/cart/getNum', { params })
}
export function addCartNum (params) {
  return request.post('/cart/add', params)
}
export function deleteCart (params) {
  return request.post('/cart/del', params)
}
export function getCart (params) {
  return request.get('/cart', { params })
}
export function addCollect (params) {
  return request.post('/collect/add', params)
}
export function deleteCollect (params) {
  return request.post('/collect/delete', params)
}
export function getCollect (params) {
  return request.post('/collect/get', params)
}
export function getAllCollect (params) {
  return request.post('/collect/getAll', params)
}

export function addOrder (params) {
  return request.post('/order/add', params)
}

export function delOrder (params) {
  return request.post('/order/del', params)
}

export function login (params) {
  return request.get('/user/login', { params })
}

export function sendMsg (params) {
  return request.get('/user/sendMsg', { params })
}

export function smslogin (params) {
  return request.get('/user/smslogin', { params })
}

export function sendMsgR (params) {
  return request.get('/user/sendMsgR', { params })
}

export function register (params) {
  return request.post('/user/register', params)
}

export function findsendMsg (params) {
  return request.get('/user/findsendMsg', { params })
}

export function changepsd (params) {
  return request.post('/user/changepsd', params)
}

export function getProColumn (params) {
  return request.get('/pro/fl', { params })
}

export function getProPage (params) {
  return request.get('/pro/page', { params })
}

export function getPresonal (params) {
  return request.get('/user/getUser', { params })
}

export function setPresonal (params) {
  return request.post('/user/setUser', params)
}

export function setUserImg (params) {
  return request.post('/user/setUser', params)
}

export function getAddress (params) {
  return request.get('/address', { params })
}

export function deleteAddress (params) {
  return request.post('##', { params })
}

export function addAddress (params) {
  return request.post('/address/add', params)
}

export function getUser (params) {
  return request.get('/user/getUser', { params })
}

export function weixinPay (params) {
  return request.get('/order/wxPay', { params })
}

export function updateCartNum (params) {
  return request.post('/cart/setNum', params)
}

export function updateCartFlag (params) {
  return request.post('/cart/updateFlag', params)
}

export function updateCartFlagAll (params) {
  return request.post('/cart/updateAllFlag', params)
}
